function ImgObj(pdObjs){
	this.position=[];//瀵硅薄BBox L锛歭eft锛宼锛歵op锛宺锛歳ight锛宐锛歜ottom
	this.matrix=null;//鍙樻崲鐭╅樀 a,b,c,d,e,f
	this.imgId=null;//瀵硅薄ID
	this.path=null;//鍥剧墖璺緞
	this.srvPath=null;//鐩樼璺緞
	this.width=null;
	this.height = null;

	this.nGenStateID = -1;
	this.nClrStateID = -1;
	this.nGraphStateID = -1;
	this.nTextStateID = -1;
	this.nClipPathStateID = -1;
	this.domImg = null;
	this.loadError = 0;
	
	
	this.m_fileName = "";
	this.m_fOrgx = null;
	this.m_fOrgy = null;
	this.m_pdObjs = pdObjs;

	this.m_bUsedSoftMask = false;

	this.CalcBBox = function () {

	    if (this.position != null && this.position.length == 4)
	        return this.position;
	    this.position = this.matrix.TransFormRect(0, 0, 1, 1);
	}
	this.GetBBox = function (mtObj2Dev) {
	    this.CalcBBox();
	    var rect = mtObj2Dev.TransFormRect(this.position[0], this.position[1], this.position[2], this.position[3]);
	    return rect;
	}
}

// set up prototype inheritance chain
 setupInheritPrototype(ImgObj, PageObj);

ImgObj.prototype.SetOrgX = function(x){
	 this.m_fOrgx = x;
}
ImgObj.prototype.GetOrgX = function(){
    return this.m_fOrgx;
}

ImgObj.prototype.SetOrgY = function(y){
	 this.m_fOrgy = y;
}
ImgObj.prototype.GetOrgY = function(){
	 return this.m_fOrgy;
}

ImgObj.prototype.SetWidth=function(width){
		this.width=width;
	}
ImgObj.prototype.GetWidth=function(){
		return this.width;
	}
ImgObj.prototype.SetHeight=function(height){
		this.height=height;
	}
ImgObj.prototype.GetHeight=function(){
		return this.height;
	}
ImgObj.prototype.SetSrvPath=function(srvPath){
		this.srvPath=srvPath;
	}
ImgObj.prototype.GetSrvPath=function(){
		return this.srvPath;
	}
ImgObj.prototype.SetPath=function(path){
		this.path=path;
	}
ImgObj.prototype.GetPath=function(){
		return this.path;
	}
ImgObj.prototype.SetImgId=function(imgId){
		this.imgId=imgId;
	}
ImgObj.prototype.GetImgId=function(){
		return this.imgId;
	}
ImgObj.prototype.SetPosition=function(positon){
		this.position=positon;
	}
ImgObj.prototype.GetPosition=function(){
		return this.position;
	}

ImgObj.prototype.ParseJson = function (arrayData) {
	    //var img = this;
	    this.SetImgId(arrayData[1]);
	    this.SetPath(arrayData[11]);
	    this.SetSrvPath(arrayData[12]);
	    this.SetPosition(stringArr2NumArr(arrayData[2]));
	    this.SetMatrix(stringArr2NumArr(arrayData[3]));
	    this.SetWidth(arrayData[9]);
	    this.SetHeight(arrayData[10]);
	    this.nGraphStateID = arrayData[6];
	    this.nClrStateID = arrayData[7];
	    this.nTextStateID = arrayData[8];
	    this.nGenStateID = arrayData[4];
	    this.nClipPathStateID = arrayData[5];
	}

ImgObj.prototype.ParseFromBin = function(rd){
	var imgId = rd.readInt32();
	this.SetImgId(imgId);
	
	var nMatrixID = rd.readInt16();
	this.matrix = this.m_pdObjs.GetMatrixByID(nMatrixID);
	
	var orgx = rd.readFloat32();
	this.SetOrgX(orgx);
	
	var orgy = rd.readFloat32();
	this.SetOrgY(orgy); 
	
	var width = rd.readInt32();
	this.SetWidth(width);
	
	var heigh = rd.readInt32();
	this.SetHeight(heigh);
	
	var nFormat = rd.readByte();
	var name = rd.readInt32();
	if(nFormat == 0){
	    this.m_fileName = name.toString() + ".png";
	}else if(nFormat == 1){
        this.m_fileName = name.toString() + ".jpg";
	}
}